package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TWithdrawApplyMapper;
import com.ruoyi.business.domain.TWithdrawApply;
import com.ruoyi.business.service.ITWithdrawApplyService;

/**
 * 提现申请Service业务层处理
 * 
 * @author laoguo
 * @date 2025-08-12
 */
@Service
public class TWithdrawApplyServiceImpl implements ITWithdrawApplyService 
{
    @Autowired
    private TWithdrawApplyMapper tWithdrawApplyMapper;

    /**
     * 查询提现申请
     * 
     * @param applyId 提现申请主键
     * @return 提现申请
     */
    @Override
    public TWithdrawApply selectTWithdrawApplyByApplyId(Long applyId)
    {
        return tWithdrawApplyMapper.selectTWithdrawApplyByApplyId(applyId);
    }

    /**
     * 查询提现申请列表
     * 
     * @param tWithdrawApply 提现申请
     * @return 提现申请
     */
    @Override
    public List<TWithdrawApply> selectTWithdrawApplyList(TWithdrawApply tWithdrawApply)
    {
        return tWithdrawApplyMapper.selectTWithdrawApplyList(tWithdrawApply);
    }

    /**
     * 新增提现申请
     * 
     * @param tWithdrawApply 提现申请
     * @return 结果
     */
    @Override
    public int insertTWithdrawApply(TWithdrawApply tWithdrawApply)
    {
        tWithdrawApply.setCreateTime(DateUtils.getNowDate());
        return tWithdrawApplyMapper.insertTWithdrawApply(tWithdrawApply);
    }

    /**
     * 修改提现申请
     * 
     * @param tWithdrawApply 提现申请
     * @return 结果
     */
    @Override
    public int updateTWithdrawApply(TWithdrawApply tWithdrawApply)
    {
        return tWithdrawApplyMapper.updateTWithdrawApply(tWithdrawApply);
    }

    /**
     * 批量删除提现申请
     * 
     * @param applyIds 需要删除的提现申请主键
     * @return 结果
     */
    @Override
    public int deleteTWithdrawApplyByApplyIds(Long[] applyIds)
    {
        return tWithdrawApplyMapper.deleteTWithdrawApplyByApplyIds(applyIds);
    }

    /**
     * 删除提现申请信息
     * 
     * @param applyId 提现申请主键
     * @return 结果
     */
    @Override
    public int deleteTWithdrawApplyByApplyId(Long applyId)
    {
        return tWithdrawApplyMapper.deleteTWithdrawApplyByApplyId(applyId);
    }
}
